Restructure the audiobook-curator example as a composed React application - #315
Conversation
…hared component library (stage 1)
…compose the catalog and curate routes (stage 2a)
…n shelf with a review tool and CLI command (stage 2b)
…ense with an MCP projector proof (stage 3a)
…mands from the shared components (stage 3b)
…application tour and update flagship Workbench pins (stage 4)
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Post-merge regression note: this merge legitimately expanded the Audiobook Curator MCP surface from 17 to 18 generated routes, leaving |
Summary
The flagship framework-mode example previously funneled every MCP tool through one 40-line switch producing a single
Agent.Textsentence, and 14 of 15 CLI commands never rendered at all. This PR restructuresexamples/audiobook-curatorinto a genuinely composed React application that demonstrates the framework's thesis by construction.src/components/— a shared, typed component library (CuratorDocument,DataList/Field/Callout,AudiobookCard,LibraryShelf,CandidateRanking,EvidenceTrail,MutationReceipt,ChapterOutline,IntegrityReport,CurationShelf, asyncLibraryAnalysis) reused across MCP tools, the catalog resource, the curate prompt, and rendered CLI commands.src/result.tsx(the switch) is deleted.src/providers/library.ts— request-time ffmpeg/ffprobe probing and workflow stages, consumed by the catalog resource via(await agent()).providers.librarywith honest degraded rendering.src/state.ts— workspace-durable curation shelf (editionSelected/mutationApplied/shelfCleared); select/apply routes dispatch and render the shelf; new read-onlyreview_curation_shelftool and renderedshelfCLI command make persistence visible across tool calls.audit_library(and CLIlibrary-audit) render an immediate shell and stream the duplicate/multipart analysis behind<Suspense fallback={<Agent.Progress/>}>;tests/route-unit/streaming.test.tsproves staged progress through the real MCP projector (renderRouteEvents+projectTargetCapabilities).inventory,select,audible-search,convert,auditpromoted to.tsx, reusing the same components as their MCP twins;--jsonoutput remains the identical canonical receipt (parity proven intests/route-unit/cli-rendered.test.ts). Plain.tscommands remain to demonstrate both modes.provider:libraryrow) with re-captured 1440×900 screenshots.Route graph: 15 tools + 30 commands + 47 routes → 16 tools + 32 commands + 50 routes. Receipts, schemas, and canonical
--jsonoutput are unchanged; no framework/package source changed (examples + one workbench test file), so no changeset.Composition gaps found during the work were filed instead of hacked around: #312 (no shared layout convention) and #313 (providers do not mount for routed CLI/rendered scripts).
Test plan
AGENT_BUNDLE_TEST_TIME_SCALE=2 pnpm examples:check(all examples) green post-rebasepnpm typecheckandpnpm lintgreenpnpm test:examples:browser5/5 in real Chrome at 1440×900, covering populated + stale-diagnostic + repair flows with re-captured screenshotsRefs #107.